
//
//  Commons.swift
//  微博01
//
//  Created by 牛威 on 15/12/7.
//  Copyright © 2015年 牛威. All rights reserved.
//

/// 类似于oc中的pch 设置全局属性

import UIKit


  let WBAppearenceTintColor = UIColor.orangeColor()

  //用于全局通知切换控制器的名称

  let WBChangeRootViewControllerNotification = "WBChangeRootViewControllerNotification"

//MARK: - 用于全局查看照片的KEY

  let WBLookPhotoNotification = "WBLookPhotoNotification"

  let  WBLookPhotoIndexPathKEY = "WBLookPhotoIndexPathKEY"

  let  WBLookPhotoURLsKEY = "WBLookPhotoURLsKEY"


  //MARK: - 全局函数可以直接使用

     func delay (delta : Double,callBack: ()->()){

    //NSEC_PER_SEC纳秒 的数据类型是  UInt64
    
    dispatch_after(dispatch_time(DISPATCH_TIME_NOW, Int64(delta * Double(NSEC_PER_SEC))), dispatch_get_main_queue(), { () -> Void in
        
//        self.close()
        
        callBack()
        
    })

    
 }









